Family Computer Emulator Ultra (Extended Debugger Sebastian Porst) Alphabet Soup (FCEU ABS)
Version 1.00
Beneficii
beneficii@gmail.com

OK, there are some additions to what went before (this is based on FCEUXD SP v1.07), and they are quite interesting.  Here we go:

Well, first, closing the Memory Viewer will now not cause the program to crash.  Er, a little oversight was fixed.




Added the Address Use Logger (which is on same window as CDLogger), which allows you to log addresses (use addresses) that access other addresses (ref addresses) in memory.  Er, a somewhat complex file format is set up.  There are various criteria for determining whether an address is logged or not, but the basic principles are accessing outside the current bank (more on bank size later), accessing RAM (specially marked), and using indexing (except for indirect x indexing).  This will help you keep track of addresses that access others.

File format:
Top block:
	(4 bytes)--Size of each bank (it needs to match that specified in the info file--more on that)
	(4 bytes)--number of use addresses
	(# bytes)--Use blocks follow one by one

Use block:
	(4 bytes)--if top bit is set, then memory address is stored, if clear, then PRG address is stored (for say FDS games that make it harder to find a PRG address)
	(3 bytes)--opcode used (different opcodes get different listing)
	(4 bytes)--number of ref addresses (the nbr of ref addresses unique to this)
	(# bytes)--Ref blocks associated with this particular use block

Ref block:
	(4 bytes)--if top bit is set, then memory address is stored, if clear, then PRG address is stored (for say FDS games that make it harder to find a PRG address); if this was indexed, then the ORIGINAL address for all the indices goes here
	(4 bytes)--If top bit is set, then indexed address was in a different bank from the bank of the original (non-indexed) address.
	(32 bytes)--each bit in this field is set if that particular index (X Y registers) was used, with this Ref Address as the base (i.e. Ref Address + Index was the address actually accessed at the time); these are all 0 if indexing was not used (or if X-indirect indexing was used to access this); formula for determining if an index value (from 0 to 255) was used, do (where V = value and B is byte number and b is bit number you have):
		B = int(V / 8)
		% = modulus or remainder
		b = X % 8

(Feel free to ask questions--preferably in a forum such as Acmlm's Board 2 (acmlm.no-ip.org) or nesdev.parodius.com--if this is confusing and you are trying to do great things with this. ^_^)




The info file:
	This is for specifying the size of banks (default is $2000) that are used by the symbol debugger and the address use logger at the moment (CDLogger uses its own system as does the emulator itself).  In the same directory as the ROM create a file using the following format: [ROM filename and extension].info.  If you had a ROM called:

smb.nes

Then, the file you would create is:

smb.nes.info

Right now, only 1 item on the first line is stored, which specifies the (PRG) bank size.  It must have a value from 0 to 2 (or the default of bank size of $2000 will be used).  Here are the values and the corresponding bank sizes:

0	$2000 (default)
1	$4000
2	$8000

(You should pick the one most appropriate to the mapper of the game you're using.  If your mapper switches out $2000 byte PRG banks, then you should go with the default.  If your mapper only switches out $4000 byte PRG banks, then you should put 1.  If you have an NROM game (such as Mario 1), then 2's your choice, as banks are more or less irrelevant to you.)

For FDS games, this is irrelevant.




Code Data Logger:
	This has been updated so that you capture specifically memory (right now from $6000-$FFFF range) that is used.  There are some differences if you use the Start Mem instead of the Start.  (For the original CDLogger, refer to the FCEUXD.txt file included with this software.)  This is geared more toward FDS games than NES games.  Each byte is stored in this format and corresponds to the (for now) $6000-$FFFF CPU memory map:

xxdc WRDC
x = unused
d = indirectly accessed as data
c = indirectly accessed as code
W = written to
R = read from
D = logged as data
C = logged as code

Unlike with the old version, vectors are not logged.

In the memory viewer, if you have CPU Memory (first mode) on, then the colors corresponding to what has been logged will be shown.  Here is a description of what each of the colors means:

blue =  		logged as code
green = 		read from
red =   		written to
greenish-blue = 	logged as code and read from
purple =		logged as code and written to
dark gold = 		read from and written to
grey = 			logged as code, read from, and written to

(Also, fixed the vector logger on the old one)



Symbolic Debugger:
	Bank size (determined in the info file) determines how the numbers are calculated (read readme.txt for more info on the symbolic debugger).  This formula is used to determine the number to put on each of the files:

	S = address in question
	B = banksize
	N = number
	N = int(S / B)

Aside from that, it is largely unchanged (though the code was heavily modified to fit this system).




Other than that, there isn't much to talk about.  I have the sense I'm forgetting some sort of feature I'm missing out on, but I'm not sure.  Oh well, (just so you know the tracer is untested with the new CD Logger--maybe you can try it out ^_^) ja ne.

